﻿using Dapper.Contrib.Extensions;
using System;

namespace Dapper.SimpleDao.Entity
{
    public class BaseEntitiy : IAggreteRoot
    {
        private string _id;
        [KeyAttribute]
        public string Id
        {
            get
            {
                if (string.IsNullOrEmpty(_id))
                {
                    _id = Guid.NewGuid().ToString();
                }
                return _id;
            }
            set { _id = value; }
        }
    }
}
